﻿using ArithmeticSimulator.View;
using Library.DataModel;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ArithmeticSimulator
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            SwitchToDifficultyPage();


        }

        internal void SwitchToDifficultyPage()
        {
            // 假设页面容器是 Grid 或其他布局控件
            Grid pageContainer = (Grid)FindName("PageContainer");

            pageContainer.Children.Clear();

            DifficultySettingView page = new DifficultySettingView();
            pageContainer.Children.Add(page);
        }

        internal void SwitchToExaminationPage(DifficultyDataModel difficulty)
        {
            // 假设页面容器是 Grid 或其他布局控件
            Grid pageContainer = (Grid)FindName("PageContainer");

            pageContainer.Children.Clear();

            ExaminationView page = new ExaminationView();
            page.BuildExamination(difficulty);
            pageContainer.Children.Add(page);
        }
    }
}